home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / DELPHI / LEDIT108.ZIP / LEMFC / LEMFC_1D.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-26  |  1.7 KB  |  76 lines

  1. #include "stdafx.h"
  2. #include "lemfc.h"
  3. #include "lemfc_1.h"
  4. #include "lemfc_1d.h"
  5. #include "lemfc_1v.h"
  6.  
  7. #define THE_VIEW ((CLemfc_1View*)m_viewList.GetHead())
  8.  
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char BASED_CODE THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CLemfc_1Doc
  16.  
  17. IMPLEMENT_DYNCREATE(CLemfc_1Doc, CDocument)
  18.  
  19. BEGIN_MESSAGE_MAP(CLemfc_1Doc, CDocument)
  20.     //{{AFX_MSG_MAP(CLemfc_1Doc)
  21.         // NOTE - the ClassWizard will add and remove mapping macros here.
  22.         //    DO NOT EDIT what you see in these blocks of generated code!
  23.     //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CLemfc_1Doc construction/destruction
  28.  
  29. CLemfc_1Doc::CLemfc_1Doc()
  30. {
  31.     // TODO: add one-time construction code here
  32.  
  33. }
  34.  
  35. CLemfc_1Doc::~CLemfc_1Doc()
  36. {
  37. }
  38.  
  39. BOOL CLemfc_1Doc::OnNewDocument()
  40. {
  41.     if (!CDocument::OnNewDocument())
  42.         return FALSE;
  43.  
  44.     // TODO: add reinitialization code here
  45.     // (SDI documents will reuse this document)
  46.     THE_VIEW->DeleteContents();
  47.  
  48.     return TRUE;
  49. }
  50.  
  51. /////////////////////////////////////////////////////////////////////////////
  52. // CLemfc_1Doc serialization
  53.  
  54. void CLemfc_1Doc::Serialize(CArchive& ar)
  55. {       
  56.     THE_VIEW->SerializeRaw(ar);
  57. }
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CLemfc_1Doc diagnostics
  61.  
  62. #ifdef _DEBUG
  63. void CLemfc_1Doc::AssertValid() const
  64. {
  65.     CDocument::AssertValid();
  66. }
  67.  
  68. void CLemfc_1Doc::Dump(CDumpContext& dc) const
  69. {
  70.     CDocument::Dump(dc);
  71. }
  72. #endif //_DEBUG
  73.  
  74. /////////////////////////////////////////////////////////////////////////////
  75. // CLemfc_1Doc commands
  76.